package com.plian.system.wrapper.hr.hrbackup;

import com.plian.Tools.DateUtil;
import com.plian.system.dto.hr.staff.RewardsPunishmentsDTO;
import com.plian.system.dto.hr.staffBackup.RewardsPunishmentsOldDTO;
import com.plian.system.entity.hr.staff.RewardsPunishments;
import com.plian.system.entity.hr.staffAnnualBackup.RewardsPunishmentsOld;
import com.plian.system.mybatis.support.BaseWrapper;
import com.plian.system.vo.hr.staff.RewardsPunishmentsVO;
import com.plian.system.vo.hr.staffAnnualBackup.RewardsPunishmentsOldVO;
import com.plian.system.wrapper.util.CacheWrapperUtil;
import com.plian.system.wrapper.util.WrapperUtil;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import static com.plian.system.wrapper.util.WrapperConstant.SPRING;

/**
 * 奖惩情况包装类,返回视图层所需的字段
 *
 * @author gangan
 * @since 2019-09-30
 */
@Mapper(componentModel = SPRING, uses = {CacheWrapperUtil.class, WrapperUtil.class})
public interface RewardsPunishmentsOldWrapper extends BaseWrapper<RewardsPunishmentsOld, RewardsPunishmentsOldDTO, RewardsPunishmentsOldVO> {

	@Override
	@Mappings(value = {
			@Mapping(source = "rewardDate", target = "rewardDateStr", dateFormat = DateUtil.PATTERN_MONTH)
	})
	RewardsPunishmentsOldVO entityToVO(RewardsPunishmentsOld entity);

}
